<?php
namespace app\integration\kline;
use think\facade\Cache;
abstract class KlineApi
{

    //分时
    const TIME_SHARING = 0;
    //天
    const TIME_DAY = 1;
    //周
    const TIME_WEEK = 2;
    //月
    const TIME_MONTH = 3;
    //年
    const TIME_YEAR = 4;
    //1min
    const TIME_1MIN= 5;
    //5min
    const TIME_5MIN= 6;
    //15min
    const TIME_15MIN= 7;
    //30min
    const TIME_30MIN= 8;
    //60min
    const TIME_60MIN= 9;
    public function polling(string $symbol) {
        $data =  Cache::store('redis')->get($symbol);;
        return ["data"=>$data];
    }
    public function getHistory(string $symbol,int $index){

    }
}